﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Net.Mail;
using System.Text;
using ARSys.Connector;

namespace ARSys.Entity
{
    [Table("ASB_Email")]
    [ARForm("ASB_Email")]
    public class Email
    {
        [Key]
        [AREntryId]
        [Column("Request_ID")]
        public string AREntryId { get; set; }

        [Column("cChr_RequestID")]
        public string RequestId { get; set; }

        [Column("cChr_RequestType")]
        public string RequestType { get; set; }

        [Column("cChr_Status")]
        public string RequestStatus { get; set; }

        [Column("cChr_Assigned")]
        public string Assigned { get; set; }

        [Column("cChr_ASG")]
        public string AssignedGroup { get; set; }

        [Column("cChr_ASGID")]
        public string AssignedGroupId { get; set; }

        [Column("cChr_Submit")]
        public string Applicant { get; set; }

        [Column("Submitter")]
        public string LastProceededGuy { get; set; }

        [Column("cChr_IsAskForMore")]
        public string AskForMoreGuy { get; set; }

        [Column("tmp_AskForMoreForView")]
        public string IsAskForMore { get; set; }

        [Column("cChr_Comment")]
        public string Comment { get; set; }

        [Column("cChr_FormName")]
        public string Form { get; set; }

        #region VM Exipiration
        [NotMapped]
        public string VM { get { return Form; } }

        [NotMapped]
        public string ExpireDate { get { return RequestStatus; } }

        [NotMapped]
        public string VMOwner { get { return Assigned; } }

        [NotMapped]
        public string NotifyCount { get { return Comment; } }
        #endregion


        [Required]
        [Column("Status")]
        [ARField(7, ARSysProxy.C_AR_DATA_TYPE_INTEGER)]
        public int IsSent { get; set; }
    }
}
